'use strict';

import request from '../request';
const _model = '/book';
export default {
  getIndex(params) {
    console.log('params', params);
    return request.get(`${_model}/index`, params, {});
  },
  // 开发环境登陆
  getBannerList(params) {
    return request.get(`/banner/list`, params, {});
  },
  // 获取出版社
  getPress(params) {
    return request.get(`${_model}/press`, params, {});
  },
  getPromoteread(params) {
    return request.get(`/promoteread/pager`, params, {});
  },
  getPromotereadDetail(params) {
    return request.get(`/promoteread/${params.id}`);
  },
  getConsonantsPager(params) {
    return request.get(`${_model}/consonants/pager`, params);
  },
  getGradePager(params) {
    return request.get(`${_model}/grade/pager`, params);
  },
  getHearingContent(params) {
    return request.get(`${_model}/hearing/content`, params);
  },
  getRecentPager(params) {
    return request.get(`${_model}/recently/pager`, params);
  },
  // 试听
  audition(params) {
    return request.post(`${_model}/audition`, params);
  },
  downloadAudio(params) {
    return request.post(`${_model}/download`, params);
  },
  getGrade(params) {
    return request.get(`${_model}/grade`, params, {});
  }
};
